includeTargets << griffonScript("Init")

target(main: "The description of the script goes here!") {
    // TODO: Implement script here
    def clazz = args
    assert clazz =~ /(\w+\.)+[A-Z]\w+/
    
    def script = new File("${griffonSettings.baseDir}/src/main/groovy/" + clazz.replace(".", "/") + ".groovy")
    if( !script.parentFile.exists() ){
        script.parentFile.mkdirs()
    }
    if( !script.exists() ){
        script.createNewFile()
    }
    
    script.write """\
package ${clazz -~ /.[^.]+$/}

class ${clazz -~ /^.+\./}{

}
"""
    echo "finish."
}

setDefaultTarget(main)
